package org.lds.simple.disruptor.strategy;

import org.lds.simple.disruptor.sequence.Sequence;

public interface WaitStrategy {
    long consumerWait(Sequence producerSequence, Sequence consumerSequence);

    default boolean allowConsume(Sequence producerSequence, Sequence consumerSequence) {
        return consumerSequence.get() < producerSequence.get();
    }

    void notifyConsumer();
}
